<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE HTML>
<ui:composition 
	template="/dinamico/template/template.xhtml" 
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pe="http://primefaces.org/ui/extensions"
	 >
		<ui:define name="conteudo">
			<h:form id="formDetalharDizimo">
				<p:panel header="#{mensagens['cabecalho.detalhar.dizimo']}" style="font-size:11px;text-align:left;">
				<p:outputLabel styleClass="label" value="#{mensagens['dados.membro']}"/>
				
				<p:separator/>
				
				<h:panelGrid columns="2" cellspacing="5" >
					<p:outputLabel styleClass="label" value="#{mensagens['cadastro.membro.nome']}"/>
					<h:outputText value="#{detalharDizimoManagedBean.membro.nome.toUpperCase()}" />							
					
					<p:outputLabel styleClass="label" value="#{mensagens['cadastro.membro.dataNascimento']}"/>
					<h:outputText value="#{detalharDizimoManagedBean.membro.dataNascimento}" >
						<f:convertDateTime locale="pt_BR" timeZone="America_SaoPaulo" pattern="dd/MM/yyyy"/>
					</h:outputText>
					
					<p:outputLabel styleClass="label" value="#{mensagens['cadastro.membro.sexo']}"/>
					<h:outputText value="#{detalharDizimoManagedBean.membro.sexo}" />
				</h:panelGrid>
				
				<p></p>
				<p:outputLabel styleClass="label" value="#{mensagens['dados.dizimo']}"/>
				<p:separator/>
				
				<h:panelGrid columns="2" cellspacing="5" >
					<p:outputLabel styleClass="label" value="#{mensagens['media.dizimo']}"/>
					<h:outputText value="#{detalharDizimoManagedBean.mediaDizimoMembro}" >
						<f:convertNumber type="currency" currencyCode="BRL" maxFractionDigits="2" integerOnly="true" />
					</h:outputText>							
					
					<p:outputLabel styleClass="label" value="#{mensagens['total.dizimo']}"/>
					<h:outputText value="#{detalharDizimoManagedBean.totalDizimo}" >
						<f:convertNumber type="currency" currencyCode="BRL" maxFractionDigits="2" integerOnly="true" />
					</h:outputText>	
					
				</h:panelGrid>
				
				<p:dataTable value="#{detalharDizimoManagedBean.listaDizimosMembro}" var="dizimo" style="text-align:center;">
					
					<p:column headerText="#{mensagens['coluna.periodo']}">
						<h:outputText value="#{dizimo.periodoReferente}" >
							<f:convertDateTime type="date" locale="pt_BR" timeZone="America_SaoPaulo" pattern="MM/yyyy"/>
						</h:outputText>
					</p:column>
					
					<p:column headerText="#{mensagens['coluna.valor']}">
						<f:facet name="footer"> 
							<h:outputText value="#{detalharDizimoManagedBean.totalDizimo}" >
								<f:convertNumber type="currency" currencyCode="BRL" maxFractionDigits="2" integerOnly="true" />
							</h:outputText>
						</f:facet> 
						<h:outputText value="#{dizimo.valorDizimo}" >
							<f:convertNumber type="currency" currencyCode="BRL" maxFractionDigits="2" integerOnly="true" />
						</h:outputText>
					</p:column>
				
				</p:dataTable>
				<h:panelGrid columns="2" cellpadding="5">
					<p:commandButton
						value="#{mensagens['botao.imprimir']}"
						action="#{detalharDizimoManagedBean.salvarEmPDF()}"
						ajax="false"
					
					/>
					<p:commandButton
						value="#{mensagens['botao.voltar']}"
						action="#{detalharDizimoManagedBean.voltarTelaListarMembroDizimo()}"
						immediate="true"
					/>
				
				</h:panelGrid>
				
				</p:panel>
			</h:form>
		</ui:define>
	</ui:composition>

